import request from '@/utils/request'

// 分页查询分类信息
export function getCategoryPage(params) {
    return request({
        url: '/category/page',
        method: 'get',
        params
    })
}

// 获取分类列表
export function getCategoryList(params) {
    return request({
        url: '/category/list',
        method: 'get',
        params
    })
}

// 新增分类
export function addCategory(data) {
    return request({
        url: '/category/add',
        method: 'post',
        data
    })
}

// 更新分类信息
export function updateCategory(data) {
    return request({
        url: '/category/update',
        method: 'post',
        data
    })
}

// 删除分类
export function removeCategory(id) {
    return request({
        url: '/category/removeById',
        method: 'delete',
        params: {id}
    })
} 